Storage medium having stored therein an image generation program, image generation method, image generation apparatus and image generation system

ABSTRACT

When a game process is performed by an exemplary game apparatus having an LCD for displaying a stereoscopically visible image, angular velocities of rotations about axes of the game apparatus are detected by using an angular velocity sensor provided in the game apparatus. A stereoscopic effect of a stereoscopically displayed image is adjusted in accordance with a magnitude of a rotation angle of the game apparatus in a roll direction calculated based on the angular velocities of the rotations about axes of the game apparatus.

CROSS REFERENCE TO RELATED APPLICATION

The disclosures of Japanese Patent Application No. 2011-125864, filed onJun. 3, 2011, are incorporated herein by reference.

FIELD

The present application discloses a storage medium having stored thereinan image generation program, an image generation method, an imagegeneration apparatus, and an image generation system.

BACKGROUND AND SUMMARY

Some conventional hand-held game apparatuses are each provided with agyro sensor. In a conventional hand-held game apparatus, when the gameapparatus is moved by a user, a rotation angle based on the movement bythe user is detected by using the gyro sensor. A virtual camera in avirtual space is moved in accordance with the detected rotation angle,and an image of a virtual object or the like in the virtual space istaken by the virtual camera, thereby generating an image. Thus, in theabove game apparatus, a position of the virtual camera is moved bymoving the hand-held game apparatus, and the virtual object viewed fromvarious points of view can be displayed.

However, when the hand-held game apparatus described above includes adisplay device for displaying a stereoscopically visible image,visibility of stereoscopically visible images can be impaired in somecases.

Therefore, the present application discloses a storage medium havingstored therein an image generation program, an image generation method,an image generation apparatus, and an image generation system which arecapable of improving visibility.

The image generation program stored in the computer-readable storagemedium according to the present application is executed on a computer ofa display device including a display section for displaying astereoscopically visible image. The image generation program causes thecomputer to execute: setting a virtual stereo camera in a predeterminedvirtual space; obtaining a stereoscopically visible image by using thevirtual stereo camera; and activating camera control for controlling anorientation of the virtual stereo camera in accordance with anorientation of the display section. Furthermore, when the camera controlis activated, the image generation program causes the computer toexecute: receiving a predetermined activation operation performed by auser and activating the camera control based on the activationoperation; obtaining, based on a reference orientation which is theorientation of the display section when the activation operation isreceived, a change amount of the orientation of the display section fromthe reference orientation as a display section orientation changeamount; controlling the orientation of the virtual stereo camera basedon the display section orientation change amount; adjusting, based atleast on a directional component in a roll direction of the displaysection orientation change amount, the virtual stereo camera so as toreduce a degree of stereoscopic effect of the image obtained by usingthe virtual stereo camera.

According to the above exemplary configuration, when the orientation ofthe display section is changed with respect to the directional componentin the roll direction, the degree of stereoscopic effect is reduced soas to be smaller as a change amount of a rotation angle in the rolldirection from the reference position is larger. Thereby, a situation inwhich stereoscopic display is not properly viewed can be prevented.Furthermore, the virtual stereo camera is controlled based on the changeamount from the reference orientation which is a position of the displaysection when the activation operation is performed by the user.Consequently, in a case where the user performs the activation operationafter the orientation of the virtual stereo camera is changed, thevirtual stereo camera can be prevented from moving suddenly.

In another exemplary configuration, the image generation program mayfurther cause the computer to execute controlling the virtual stereocamera so that the degree of stereoscopic effect becomes zero when thedirectional component in the roll direction of the display sectionorientation change amount exceeds a predetermined threshold forstereoscopic effect degree adjustment.

According to the above exemplary configuration, when a change in theorientation of the display section with respect to the directionalcomponent in the roll direction exceeds a certain value, an image withno stereoscopic effect is displayed. Thereby, a situation in whichstereoscopic display is not properly viewed can be prevented.

In another exemplary configuration, the image generation program mayfurther cause the computer to execute moving an object based on anoperation performed by the user. At this time, the position of thevirtual stereo camera may be set based on the position of the movedobject.

In another exemplary configuration, the object may be moved also whenthe virtual camera control is activated.

According to the above exemplary configuration, the virtual stereocamera is set based on the position of the object. Accordingly, thevirtual stereo camera can be set appropriately in accordance with theposition of the object.

In another exemplary configuration, a change amount of the cameraorientation may be limited.

According to the above exemplary configuration, the orientation of thevirtual stereo camera is changed only within a predetermined range.Accordingly, a situation in which the user moves the apparatusvigorously and stereoscopic display is not properly viewed can beprevented.

According to the above, a storage medium having stored therein an imagegeneration program, an image generation method, an image generationapparatus, and an image generation system which are capable of improvingvisibility can be provided.

These and other objects, features, aspects and advantages will becomemore apparent from the following detailed description when taken inconjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a non-limiting example of an external configuration of agame apparatus according to an exemplary embodiment;

FIG. 2 shows a non-limiting example of an internal configuration of thegame apparatus according to the exemplary embodiment;

FIG. 3 shows a non-limiting example of a usage of the game apparatusaccording to the exemplary embodiment and a display screen and a virtualspace in the usage;

FIG. 4 shows a non-limiting example of a usage of the game apparatusaccording to the exemplary embodiment and a display screen and a virtualspace in the usage;

FIG. 5 shows a non-limiting example of a usage of the game apparatusaccording to the exemplary embodiment and a display screen and a virtualspace in the usage;

FIG. 6 shows a non-limiting example of a memory map in the exemplaryembodiment;

FIG. 7 shows a non-limiting example of a flow chart of a display controlprocess performed by a CPU of the game apparatus according to theexemplary embodiment executing an information processing program;

FIG. 8 shows a non-limiting example of a flow chart of a display controlprocess performed by a CPU of a game apparatus according to theexemplary embodiment executing an information processing program; and

FIG. 9 shows a non-limiting example of a positioning method of a virtualstereo camera according to the exemplary embodiment.

DETAILED DESCRIPTION OF NON-LIMITING EXAMPLE EMBODIMENTS ExternalStructure of Game Apparatus

Hereinafter, a game apparatus according to an exemplary embodiment(first embodiment) will be described. FIG. 1 is a plan view illustratingan appearance of a game apparatus 10. The game apparatus 10 is ahand-held game apparatus and is configured to be foldable. FIG. 1 is afront view of the game apparatus 10 in an opened state. The gameapparatus 10 is able to take an image by means of an imaging section,display the taken image on a screen, and store data of the taken image.The game apparatus 10 can execute a game program which is stored in anexchangeable memory card or a game program which is received from aserver or another game apparatus, and can display, on the screen, animage generated by computer graphics processing, such as an image takenby a virtual camera set in a virtual space, for example.

Initially, an external structure of the game apparatus 10 will bedescribed with reference to FIG. 1. The game apparatus 10 includes alower housing 11 and an upper housing 21 as shown in FIG. 1. The lowerhousing 11 and the upper housing 21 are connected to each other so as tobe openable and closable (foldable).

(Description of Lower Housing)

Initially, a structure of the lower housing 11 will be described. Asshown in FIG. 1, in the lower housing 11, a lower LCD (Liquid CrystalDisplay) 12, a touch panel 13, operation buttons 14A to 14I, an analogstick 15, an LED 16A and an LED 16B, an insertion opening 17, and amicrophone hole 18 are provided. Hereinafter, these components will bedescribed in detail.

As shown in FIG. 1, the lower LCD 12 is accommodated in the lowerhousing 11. The number of pixels of the lower LCD 12 may be, forexample, 320 dots×240 dots (the horizontal line×the vertical line). Thelower LCD 12 is a display device for displaying an image in a planarmanner (not in a stereoscopically visible manner), which is differentfrom the upper LCD 22 as described below. Although an LCD is used as adisplay device in the exemplary embodiment, any other display devicesuch as a display device using an EL (Electro Luminescence), or the likemay be used. In addition, a display device having any resolution may beused as the lower LCD 12.

As shown in FIG. 1, the game apparatus 10 includes the touch panel 13 asan input device. The touch panel 13 is mounted on the screen of thelower LCD 12. In the exemplary embodiment, the touch panel 13 may be,but is not limited to, a resistive film type touch panel. A touch panelof any type such as electrostatic capacitance type may be used. In theexemplary embodiment, the touch panel 13 has the same resolution(detection accuracy) as that of the lower LCD 12. However, theresolution of the touch panel 13 and the resolution of the lower LCD 12may not necessarily be the same. Further, the insertion opening 17(indicated by dashed line in FIG. 1) is provided on the upper sidesurface of the lower housing 11. The insertion opening 17 is used foraccommodating a touch pen 28 which is used for performing an operationon the touch panel 13. Although an input on the touch panel 13 isusually made by using the touch pen 28, a finger of a user may be usedfor making an input on the touch panel 13, in addition to the touch pen28.

The operation buttons 14A to 14I are each an input device for making apredetermined input. As shown in FIG. 1, a cross button 14A (a directioninput button 14A), a button 14B, a button 14C, a button 14D, a button14E, a power button 14F, a selection button 14G, a HOME button 14H, anda start button 14I are provided on the inner side surface (main surface)of the lower housing 11. The cross button 14A is cross-shaped, andincludes buttons for indicating an upward, a downward, a leftward, or arightward direction. The buttons 14A to 14E, the selection button 14G,the HOME button 14H, and the start button 14I are assigned functions,respectively, in accordance with a program executed by the gameapparatus 10, as necessary. For example, the cross button 14A is usedfor selection operation and the like, and the operation buttons 14B to14E are used for, for example, determination operation and cancellationoperation. The power button 14F is used for powering the game apparatus10 on/off.

The analog stick 15 is a device for indicating a direction. The analogstick 15 has a top, corresponding to a key, which slides parallel to theinner side surface of the lower housing 11. The analog stick 15 acts inaccordance with a program executed by the game apparatus 10. Forexample, when a game in which a predetermined object emerges in athree-dimensional virtual space is executed by the game apparatus 10,the analog stick 15 acts as an input device for moving the predeterminedobject in the three-dimensional virtual space. In this case, thepredetermined object is moved in a direction in which the topcorresponding to the key of the analog stick 15 slides. As the analogstick 15, a component which enables an analog input by being tilted by apredetermined amount, in any direction, such as the upward, thedownward, the rightward, the leftward, or the diagonal direction, may beused.

Further, the microphone hole 18 is provided on the inner side surface ofthe lower housing 11. Under the microphone hole 18, a microphone (seeFIG. 2) is provided as a sound input device described below, and themicrophone detects for a sound from the outside of the game apparatus10.

Moreover, an L button 14J and an R button 14K are provided on the upperside surface of the lower housing 11, which are not shown. The L button14J and the R button 14K act as, for example, shutter buttons (imaginginstruction buttons) of the imaging section. Further, a sound volumebutton 14L is provided on the left side surface of the lower housing 11,which is not shown. The sound volume button 14L is used for adjusting asound volume of a speaker of the game apparatus 10.

As shown in FIG. 1, a cover section 11B is provided on the left sidesurface of the lower housing 11 so as to be openable and closable.Inside the cover section 11B, a connector (not shown) is provided forelectrically connecting between the game apparatus 10 and an externaldata storage memory 46. The external data storage memory 46 isdetachably connected to the connector. The external data storage memory46 is used for, for example, recording (storing) data of an image takenby the game apparatus 10.

Further, as shown in FIG. 1, an insertion opening 11C through which anexternal memory 45 having a game program stored therein is inserted isprovided on the upper side surface of the lower housing 11. A connector(not shown) for electrically connecting between the game apparatus 10and the external memory 45 in a detachable manner is provided inside theinsertion opening 11C. A predetermined game program is executed byconnecting the external memory 45 to the game apparatus 10.

Further, as shown in FIG. 1, a first LED 16A for notifying a user of anON/OFF state of a power supply of the game apparatus 10 is provided onthe lower side surface of the lower housing 11. Furthermore, a secondLED 16B for notifying a user of an establishment state of a wirelesscommunication of the game apparatus 10 is provided on the right sidesurface of the lower housing 11, which is not shown. The game apparatus10 can make wireless communication with other devices, and the secondLED 16B is lit up when the wireless communication is established. Thegame apparatus 10 has a function of connecting to a wireless LAN in amethod based on, for example, IEEE802.11.b/g standard. A wireless switch19 for enabling/disabling the function of the wireless communication isprovided on the right side surface of the lower housing 11 (not shown).

A rechargeable battery (not shown) acting as a power supply for the gameapparatus 10 is accommodated in the lower housing 11, and the batterycan be charged through a terminal provided on a side surface (forexample, the upper side surface) of the lower housing 11.

(Description of Upper Housing)

Next, a structure of the upper housing 21 will be described. As shown inFIG. 1, in the upper housing 21, an upper LCD (Liquid Crystal Display)22, an outer imaging section 23 (an outer imaging section (left) 23 aand an outer imaging section (right) 23 b), an inner imaging section 24,a 3D adjustment switch 25, and a 3D indicator 26 are provided.Hereinafter, these components will be described in detail.

As shown in FIG. 1, the upper LCD 22 is accommodated in the upperhousing 21. The number of pixels of the upper LCD 22 may be, forexample, 800 dots×240 dots (the horizontal line×the vertical line).Although, in the exemplary embodiment, the upper LCD 22 is an LCD, adisplay device using an EL (Electro Luminescence), or the like may beused. In addition, a display device having any resolution may be used asthe upper LCD 22.

The upper LCD 22 is a display device capable of displaying astereoscopically visible image. Further, in the exemplary embodiment, animage for a left eye and an image for a right eye are displayed by usingsubstantially the same display area. Specifically, the upper LCD 22 maybe a display device using a method in which the image for a left eye andthe image for a right eye are alternately displayed in the horizontaldirection in predetermined units (for example, every other line).Alternatively, a display device using a method in which the image for aleft eye and the image for a right eye may be alternately displayed in atime division manner may be used. Further, in the exemplary embodiment,the upper LCD 22 is a display device capable of displaying an imagewhich is stereoscopically visible with naked eyes. A lenticular lenstype display device or a parallax barrier type display device is usedwhich enables the image for a left eye and the image for a right eye,which are alternately displayed in the horizontal direction, to beseparately viewed by the left eye and the right eye, respectively. Inthe exemplary embodiment, the upper LCD 22 of a parallax barrier type isused. The upper LCD 22 displays, by using the image for a right eye andthe image for a left eye, an image (hereinafter, referred to as a“stereoscopically visible image”) which is stereoscopically visible withnaked eyes. That is, the upper LCD 22 allows a user to view the imagefor a left eye with her/his left eye, and the image for a right eye withher/his right eye by utilizing a parallax barrier, so that astereoscopically visible image exerting a stereoscopic effect for a usercan be displayed. Further, the upper LCD 22 may disable the parallaxbarrier. When the parallax barrier is disabled, an image can bedisplayed in a planar manner (it is possible to display a planar visibleimage which is different from a stereoscopically visible image asdescribed above. Specifically, a display mode is used in which the samedisplayed image is viewed with a left eye and a right eye.). Thus, theupper LCD 22 is a display device capable of switching between astereoscopically visible display (stereoscopic display mode) fordisplaying a stereoscopic image which is stereoscopically visible and aplanar view display (planar display mode) for displaying an image in aplanar manner (for displaying a planar view image). The switching of thedisplay is performed by a process performed by a CPU 311 or by the 3Dadjustment switch 25 described below.

Two imaging sections (23 a and 23 b) provided on the outer side surface(the back surface reverse of the main surface on which the upper LCD 22is provided) 21D of the upper housing 21 are generically referred to asthe outer imaging section 23. The viewing directions of the outerimaging section (left) 23 a and the outer imaging section (right) 23 bare each the same as the outward normal direction of the outer sidesurface 21D. The outer imaging section (left) 23 a and the outer imagingsection (right) 23 b can be used as a stereo camera depending on aprogram executed by the game apparatus 10. Each of the outer imagingsection (left) 23 a and the outer imaging section (right) 23 b includesan imaging device, such as a CCD image sensor or a CMOS image sensor,having a common predetermined resolution, and a lens. The lens may havea zooming mechanism.

The inner imaging section 24 is positioned on the inner side surface(main surface) 21B of the upper housing 21, and acts as an imagingsection which has a viewing direction which is the same direction as theinward normal direction of the inner side surface. The inner imagingsection 24 includes an imaging device, such as a CCD image sensor and aCMOS image sensor, having a predetermined resolution, and a lens. Thelens may have a zooming mechanism.

The 3D adjustment switch 25 is a slide switch, and is used for switchinga display mode of the upper LCD 22 as described above. The 3D adjustmentswitch 25 is used for adjusting the stereoscopic effect of astereoscopically visible image which is displayed on the upper LCD 22.However, as is apparent from the below description, an exemplary casewill be described in which an image displayed on the upper LCD 22 isswitched between a stereoscopically visible image and a planar viewimage, regardless of whether the 3D adjustment switch 25 is operated, inthe exemplary embodiment.

The 3D indicator 26 indicates whether or not the upper LCD 22 is in thestereoscopic display mode. The 3D indicator 26 is implemented as a LED,and is lit up when the stereoscopic display mode of the upper LCD 22 isenabled. The 3D indicator 26 may be lit up only when the programprocessing for displaying a stereoscopically visible image is performedin a situation in which the upper LCD 22 is in the stereoscopic displaymode. As shown in FIG. 1, the 3D indicator 26 is positioned near thescreen of the upper LCD 22 on the inner side surface of the upperhousing 21. Therefore, when a user views the screen of the upper LCD 22from the front thereof, the user can easily view the 3D indicator 26.Therefore, also when a user is viewing the screen of the upper LCD 22,the user can easily recognize the display mode of the upper LCD 22.

Further, a speaker hole 21E is provided on the inner side surface of theupper housing 21. A sound is outputted through the speaker hole 21E froma speaker 43 described below.

(Internal Configuration of Game Apparatus 10)

Next, an internal electrical configuration of the game apparatus 10 willbe described with reference to FIG. 2. FIG. 2 is a block diagramillustrating an internal configuration of the game apparatus 10. Asshown in FIG. 2, the game apparatus 10 includes, in addition to thecomponents described above, electronic components such as an informationprocessing section 31, a main memory 32, an external memory interface(external memory I/F) 33, an external data storage memory I/F 34, aninternal data storage memory 35, a wireless communication module 36, alocal communication module 37, a real-time clock (RTC) 38, anacceleration sensor 39, a power supply circuit 40, an interface circuit(I/F circuit) 41, and the like. These electronic components are mountedon an electronic circuit substrate, and accommodated in the lowerhousing 11 (or the upper housing 21).

The information processing section 31 is information processing meanswhich includes a CPU (Central Processing Unit) 311 for executing apredetermined program, a GPU (Graphics Processing Unit) 312 forperforming image processing, and the like. The CPU 311 of theinformation processing section 31 executes a program stored in a memory(for example, the external memory connected to the external memory I/F33, or the internal data storage memory 35) in the game apparatus 10, toexecute a process based on the program. The program executed by the CPU311 of the information processing section 31 may be acquired fromanother device through communication with the other device. Theinformation processing section 31 further includes a VRAM (Video RAM)313. The GPU 312 of the information processing section 31 generates animage in accordance with an instruction from the CPU 311 of theinformation processing section 31, and renders the image in the VRAM313. The GPU 312 of the information processing section 31 outputs theimage rendered in the VRAM 313, to the upper LCD 22 and/or the lower LCD12, and the image is displayed on the upper LCD 22 and/or the lower LCD12.

To the information processing section 31, the main memory 32, theexternal memory I/F 33, the external data storage memory I/F 34, and theinternal data storage memory 35 are connected. The external memory I/F33 is an interface for detachably connecting to the external memory 45.The external data storage memory I/F 34 is an interface for detachablyconnecting to the external data storage memory 46.

The main memory 32 is volatile storage means used as a work area and abuffer area for (the CPU 311 of) the information processing section 31.That is, the main memory 32 temporarily stores various types of dataused for the process based on the program described above, andtemporarily stores a program acquired from the outside (the externalmemory 45, another device, or the like), for example. In the exemplaryembodiment, for example, a PSRAM (Pseudo-SRAM) is used as the mainmemory 32.

The external memory 45 is nonvolatile storage means for storing aprogram executed by the information processing section 31. The externalmemory 45 is implemented as, for example, a read-only semiconductormemory. When the external memory 45 is connected to the external memoryI/F 33, the information processing section 31 can load a program storedin the external memory 45. A predetermined process is performed by theprogram loaded by the information processing section 31 being executed.The external data storage memory 46 is implemented as a non-volatilereadable and writable memory (for example, a NAND flash memory), and isused for storing predetermined data. For example, images taken by theouter imaging section 23 and/or images taken by another device arestored in the external data storage memory 46. When the external datastorage memory 46 is connected to the external data storage memory I/F34, the information processing section 31 loads an image stored in theexternal data storage memory 46, and the image can be displayed on theupper LCD 22 and/or the lower LCD 12.

The internal data storage memory 35 is implemented as a non-volatilereadable and writable memory (for example, a NAND flash memory), and isused for storing predetermined data. For example, data and/or programsdownloaded through the wireless communication module 36 by wirelesscommunication is stored in the internal data storage memory 35.

The wireless communication module 36 has a function of connecting to awireless LAN by using a method based on, for example, IEEE 802.11.b/gstandard. The local communication module 37 has a function of performingwireless communication with the same type of game apparatus in apredetermined communication method (for example, a communication basedon an independent protocol, or infrared communication). The wirelesscommunication module 36 and the local communication module 37 areconnected to the information processing section 31. The informationprocessing section 31 can perform data transmission to and datareception from another device via the Internet by using the wirelesscommunication module 36, and can perform data transmission to and datareception from the same type of another game apparatus by using thelocal communication module 37.

The RTC 38 and the power supply circuit 40 are connected to theinformation processing section 31. The RTC 38 counts time and outputsthe counted time to the information processing section 31. Theinformation processing section 31 calculates a current time (date) basedon the time counted by the RTC 38.

The acceleration sensor 39 is connected to the information processingsection 31. The acceleration sensor 39 detects magnitudes ofaccelerations (linear accelerations) in the directions of the straightlines along the three axial (xyz axial) directions, respectively. Theacceleration sensor 39 is provided inside the upper housing 21. In theacceleration sensor 39, as shown in FIG. 1, the long side direction ofthe upper LCD 22 is defined as x axial direction, the short sidedirection of the upper LCD 22 is defined as y axial direction, and thedirection orthogonal to the inner side surface of the upper LCD 22 isdefined as z axial direction, thereby detecting magnitudes of the linearaccelerations for the respective axes. The acceleration sensor 39 is,for example, an electrostatic capacitance type acceleration sensor.However, another type of acceleration sensor may be used. Theacceleration sensor 39 may be an acceleration sensor for detecting amagnitude of an acceleration for one axial direction or two-axialdirections. The information processing section 31 can receive data(acceleration data) representing accelerations detected by theacceleration sensor 39, and detect an orientation and a motion of thegame apparatus 10.

An angular velocity sensor 40 is connected to the information processingsection 31. The angular velocity sensor 40 detects angular velocitiesaround the three axes (xyz-axes in the exemplary embodiment) of theupper LCD 22, and outputs, to the information processing section 31,data (angular velocity data) representing the angular velocities havingbeen detected. The angular velocity sensor 40 is provided inside thelower housing 11, for example. The information processing section 31receives the angular velocity data outputted by the angular velocitysensor 40, and calculates an orientation and a motion of the upper LCD22.

As described above, the orientation and the motion of the upper LCD 22are calculated by the acceleration sensor 39 and the angular velocitysensor 40. The long side direction, the short side direction, and thedirection orthogonal to the display screen of the upper LCD 22 coincidewith the long side direction, the short side direction and the directionorthogonal to the inner side surface (main surface) of the upper housing21, respectively. Consequently, an orientation and a motion of the upperLCD 22 coincide with an orientation and a motion of the upper housing 21which fixedly accommodates the upper LCD. In the following description,obtaining an orientation and a motion of the game apparatus is the samemeaning as obtaining an orientation and a motion of the upper LCD 22.

The power supply circuit 41 controls power to be supplied from a powersupply (the rechargeable battery accommodated in the lower housing 11)of the game apparatus 10, and supplies power to each component of thegame apparatus 10.

The I/F circuit 42 is connected to the information processing section31. The microphone 43 and the speaker 44 are connected to the I/Fcircuit 42. Specifically, the speaker 44 is connected to the I/F circuit42 through an amplifier which is not shown. The microphone 43 detects avoice from a user, and outputs a sound signal to the I/F circuit 42. Theamplifier amplifies the sound signal outputted from the I/F circuit 42,and a sound is outputted from the speaker 44. The touch panel 13 isconnected to the I/F circuit 42. The I/F circuit 42 includes a soundcontrol circuit for controlling the microphone 43 and the speaker 44(amplifier), and a touch panel control circuit for controlling the touchpanel. The sound control circuit performs A/D conversion and D/Aconversion on the sound signal, and converts the sound signal to apredetermined form of sound data, for example. The touch panel controlcircuit generates a predetermined form of touch position data based on asignal outputted from the touch panel 13, and outputs the touch positiondata to the information processing section 31. The touch position datarepresents a coordinate of a position, on an input surface of the touchpanel 13, on which an input is made.

The operation button 14 includes the operation buttons 14A to 14Ldescribed above, and is connected to the information processing section31. Operation data representing an input state of each of the operationbuttons 14A to 14I is outputted from the operation button 14 to theinformation processing section 31, and the input state indicates whetheror not each of the operation buttons 14A to 14L has been pressed. Theinformation processing section 31 acquires the operation data from theoperation button 14 to perform a process in accordance with the input oneach of the operation buttons 14A to 14L. The CPU 311 acquires theoperation data from the operation button 14 every predetermined time.

The lower LCD 12 and the upper LCD 22 are connected to the informationprocessing section 31. The lower LCD 12 and the upper LCD 22 eachdisplay an image in accordance with an instruction from (the GPU 312 of)the information processing section 31. In the exemplary embodiment, theinformation processing section 31 causes the upper LCD 22 to display astereoscopic image (stereoscopically visible image).

Specifically, the information processing section 31 is connected to anLCD controller (not shown) of the upper LCD 22, and causes the LCDcontroller to set the parallax barrier to ON or OFF. When the parallaxbarrier is set to ON in the upper LCD 22, an image for a right eye andan image for a left eye, which are stored in the VRAM 313 of theinformation processing section 31, are outputted to the upper LCD 22.More specifically, the LCD controller alternately repeats reading ofpixel data of the image for a right eye for one line in the verticaldirection, and reading of pixel data of the image for a left eye for oneline in the vertical direction, thereby reading, from the VRAM 313, theimage for a right eye and the image for a left eye. Thus, an image to bedisplayed is divided into the images for a right eye and the images fora left eye each of which is a rectangle-shaped image having one line ofpixels aligned in the vertical direction, and an image, in which therectangle-shaped image for the left eye which is obtained through thedivision, and the rectangle-shaped image for the right eye which isobtained through the division are alternately aligned, is displayed onthe screen of the upper LCD 22. A user views the images through theparallax barrier in the upper LCD 22, so that the image for the righteye is viewed by the user's right eye, and the image for the left eye isviewed by the user's left eye. In the exemplary embodiment, the parallaxbarrier is constantly set to be ON. Thus, the stereoscopically visibleimage is displayed on the screen of the upper LCD 22.

The outer imaging section 23 and the inner imaging section 24 areconnected to the information processing section 31. The outer imagingsection 23 and the inner imaging section 24 each take an image inaccordance with an instruction from the information processing section31, and data of the taken images are outputted to the informationprocessing section 31.

The 3D adjustment switch 25 is connected to the information processingsection 31. The 3D adjustment switch 25 transmits, to the informationprocessing section 31, an electrical signal in accordance with theposition of the slider 25 a.

The 3D indicator 26 is connected to the information processing section31. The information processing section 31 controls whether or not the 3Dindicator 26 is to be lit up. For example, the information processingsection 31 lights up the 3D indicator 26 when the upper LCD 22 is in thestereoscopic display mode. The game apparatus 10 has the internalconfiguration as described above.

[Outline of Information Processing]

In the following, an outline of information processing according to theexemplary embodiment will be described with reference to FIGS. 3, 4, and5. In the exemplary embodiment, a game process performed by the gameapparatus 10 will be described as an example of the informationprocessing.

In the game process according to the exemplary embodiment, a game isadvanced by a player moving a player object that appears in a virtualgame space within the virtual game space by using operation means of thegame apparatus 10. For example, when the analog stick 15 is tiltedupward, the player object moves farther in a depth direction in thevirtual space. When the analog stick 15 is tilted downward, the playerobject moves forward in the depth direction in the virtual space. Anorientation (direction) of the player object is controlled so that theforward direction of the player object faces in a direction designatedby the analog stick 15. Further, the player object can be caused toperform a motion such as a jumping motion by operating another operationmeans (a button, a touch panel, and the like); however, a detaileddescription thereof is omitted here.

When the game process according to the exemplary embodiment isperformed, a process of positioning a virtual stereo camera in thevirtual game space is performed. Then, the virtual game space iscaptured by using the positioned virtual stereo camera, therebygenerating an image to be displayed on the screen of the game apparatus.The virtual stereo camera includes a right virtual camera and a leftvirtual camera. The virtual cameras each capture the virtual game spaceand generate an image for a right eye and an image for a left eye,respectively. Thereby the virtual game space is stereoscopicallydisplayed on the display means 22 by using these images.

In the exemplary embodiment, a position and an orientation of thevirtual stereo camera are set based on a position and an orientation ofthe player object. Specifically, the virtual stereo camera is positionedat a position such that the virtual stereo camera captures the playerobject from behind and in an orientation such that its viewing directionfaces a direction of the player object. As described above, theorientation of the player object is controlled based on a predeterminedoperation (an operation of the analog stick 15 in the exemplaryembodiment) performed by the user. Accordingly, the orientation of thevirtual stereo camera is changed in accordance with the predeterminedoperation performed by the user.

Further, in the exemplary embodiment, when the virtual stereo camera ispositioned in the virtual game space, firstly, a virtual camera whichacts as a reference virtual camera is set based on the position and theorientation of the player object. Then, based on the set referencevirtual camera, the left virtual camera and the left virtual camera arepositioned. Although specific processes will be described later, thereference virtual camera moved in the left direction (in the x-axispositive direction) and the reference virtual camera moved in the rightdirection (in the x-axis negative direction) in a reference virtualcamera coordinate system are used as the left and the right virtualcameras, respectively.

As described above, the position and the orientation of the virtualstereo camera is changed in accordance with the position and theorientation of the player object based on an operation of the analogstick 15. In the game process according to the exemplary embodiment, theorientation of the virtual stereo camera can be changed by changing anorientation of the game apparatus in a real space. The control of theorientation of the virtual camera based on the orientation of the gameapparatus is referred to as “apparatus orientation follow-up control.”More specifically, when the player performs a predetermined operation byusing the operation means of the game apparatus 10, the apparatusorientation follow-up control is activated. In the exemplary embodiment,an operation of pressing the R button 14K is the “predeterminedoperation.” While the R button 14K is being pressed, the control is in avirtual camera control mode, and the virtual camera can be operated.When the R button 14K is released, the control is in a normal mode, andthe virtual camera is not moved even if the orientation of the gameapparatus is changed. The apparatus orientation follow-up control may bemaintained when the R button 14K is pressed and then released.

FIG. 3 and FIG. 4 each show how the virtual stereo camera is operated bymoving the game apparatus 10. It should be noted that, in reality, thevirtual stereo camera includes two virtual cameras which are the leftvirtual camera and the right virtual camera and a stereoscopic image isdisplayed on the screen. However, for ease of illustration, a singlevirtual camera is provided and a planar image is displayed on the screenin each of FIG. 3 and FIG. 4. FIG. 3 shows a play situation 301A in anormal state (a state in which the R button 14K is not pressed), animage 302A to be displayed on the screen, and a state 303A of objectsand the virtual camera in the virtual game space in the situation 301A.As shown in the state 303A, in the normal state, a virtual camera 312Ais positioned so as to capture a player object 310 from directly behindand an image in which the player object 310 is positioned in the middlein the horizontal direction is displayed on the screen. FIG. 4 shows asituation 301B when the R button 14K is pressed in the state of FIG. 3and the game apparatus is rotated in a leftward direction, an image 302Bto be displayed on the screen, and a state 303B of the objects and thevirtual camera in the virtual game space in the situation 301B. At thistime, the apparatus orientation follow-up control is activated by the Rbutton 14K being pressed, and an image 311 indicating that the apparatusorientation follow-up control is activated is displayed on the screen.While the apparatus orientation follow-up control is activated, thevirtual camera can be moved in accordance with the orientation of thegame apparatus. In FIG. 4, the game apparatus is rotated in the leftwarddirection after the apparatus orientation follow-up control is activated(while the R button 14K is being pressed), and a virtual camera 312Brotates in the leftward direction in the same manner. Consequently, aviewing direction of the virtual camera 312B shifts in the leftwarddirection so as to capture a range shifted in the leftward directionfrom the range which the virtual camera 312B has originally captured.Thus, an object 313 which has been present in the leftward directionfrom the player object and has not been displayed on the screen isdisplayed on the screen.

In the state of FIG. 4, the apparatus orientation follow-up control isinactivated when the R button 14K is released. At this time, theorientation of the virtual camera returns to that as shown in 303Aautomatically without returning the orientation of the game apparatus tothe state of 301A, and the image being displayed on the screen becomesthe same as 302A.

A change in the orientation of the game apparatus is represented aschange about the x-axis (in a tilt direction), change about the y-axis(in a pan direction), and change about the z-axis (in a roll direction).With reference to FIG. 3 and FIG. 4, a case where the orientation of thegame apparatus is changed about the y-axis has been described. Althoughdetailed description is omitted here, also when the game apparatus isrotationally moved about the x-axis, the orientation of the virtualcamera changes in accordance with the orientation of the game apparatusin the same manner as when the game apparatus is rotationally movedabout the y-axis.

Further, also when the orientation of the game apparatus is changedabout the z-axis, the orientation of the virtual camera changes inaccordance with the orientation of the game apparatus. FIG. 5 shows asituation 401 in which the game apparatus is tilted and an image 402 tobe displayed on the screen in the situation 401. When the apparatusorientation is changed about the z-axis, the viewing direction of thevirtual camera does not change, and the virtual camera is rotated aboutthe viewing direction thereof as an axis. At this time, an image asshown in the image 402 which is tilted with respect to the gameapparatus is displayed on the screen. When the game apparatus is in thestate shown in 401, the display means displaying the image is tiltedwith respect to the user. Consequently, the user views the objects suchas the player object in the virtual game space at the same angle asbefore the game apparatus is tilted.

In the exemplary embodiment, a unit of the angle relative to each axiswhich is calculated based on the angular velocity of the rotation abouteach axis having been detected by the angular velocity sensor 40 ispreset so as to be equivalent to a unit of an angle relative to eachaxis of the virtual space. Therefore, in the exemplary embodiment, therotation angle relative to each axis calculated based on the angularvelocity of the rotation about each axis detected by the angularvelocity sensor 40 can be used, as it is, as a rotation angle forchanging the orientation of the virtual camera.

In the exemplary embodiment, a range of changing the orientation of thevirtual camera about each of the x-axis (in the tilt direction) and they-axis (in the pan direction) is limited. Specifically, the orientationof the virtual camera can be changed within a range that does not allowthe viewing direction of the virtual camera to deviate greatly from theplayer object. For example, in a case where the game apparatus isfurther rotated in the leftward direction in the state shown in FIG. 4while the apparatus orientation follow-up control is active (while the Rbutton 14K is kept pressed), if the virtual camera is rotated in theleftward direction in the same manner as the game apparatus, the playerobject may deviate from a viewing range of the virtual camera and willnot be displayed on the screen. For this reason, even if the gameapparatus is further rotated in the leftward direction in the stateshown in FIG. 4, the virtual camera is not rotated further from thestate of FIG. 4 and the image displayed on the screen does not changefrom the state of FIG. 4.

Meanwhile, when the orientation of the game apparatus is changed aboutthe z-axis (in the roll direction), unlike the change about each of thex-axis (in the tilt direction) and y-axis (in the pan direction), thereis no limit on the range of changing the orientation of the virtualcamera. However, when the orientation of the game apparatus is changedabout the z-axis (in the roll direction), the following situation mayoccur. Naked eye stereoscopic display means used in the exemplaryembodiment displays a stereoscopically visible image by allocating animage for a right eye and an image for a left eye so that the image fora right eye is viewed only by the user's right eye and the image for aleft eye is viewed only by the user's left eye. Normally, when the userand the display means face each other (when the up-down direction of theuser coincides with the up-down direction of the display means), animage can be stereoscopically viewed. If the display means is rotatedabout the z-axis, the up-down direction of the user is shifted from theup-down direction of the display means. Consequently, the image for aright eye is viewed also by the left eye and the image for a left eye isviewed also by the right eye, and the user cannot view an imagestereoscopically. In this situation, a slight change in the orientationof the game apparatus can frequently switch between states in which theimage for a right eye is viewed, the image for a left eye is viewed, andboth of the images are viewed at the same time. As a result, if aparallax between the image for a right eye and the image for a left eyeis too large, two images which are greatly different from each other areviewed alternately. This causes the user to view a blurred image whichis difficult to view.

For this reason, in the exemplary embodiment, when the virtual camera isrotated about an axis orthogonal to the upper LCD 22 (about the z-axis)in accordance with change in the orientation of the game apparatus, thevirtual camera is controlled simultaneously so that a parallax (that is,a degree of stereoscopic effect) between the image for a right eye andthe image for a left eye becomes small. Specifically, respectivepositions of the right virtual camera and the left virtual camera arechanged so that greater the rotation angle in the roll direction is, thesmaller a virtual stereo camera distance (a distance between the rightvirtual camera and the left virtual camera) becomes. In the exemplaryembodiment, a virtual stereo camera distance is controlled so that thevirtual stereo camera distance becomes zero (that is, the degree ofstereoscopic effect becomes zero) when the virtual camera is tilted by25 degrees in the roll direction from a reference virtual cameraorientation. When the virtual camera is tilted by an angle greater than25 degrees, the virtual stereo camera distance stays zero. In this case,the image for a right eye is identical to the image for a left eye, andthus an image is displayed in a planar manner on the display means.

[Data to be Stored in Main Memory]

Next, data to be stored in the main memory 32 in accordance with thegame program being executed by the CPU 311 will be described withreference to FIG. 6 prior to description of a specific operationperformed by the CPU 311 of the game apparatus 10. The game program isstored in a predetermined storage medium attachable to the gameapparatus 10 or in a nonvolatile memory in the game apparatus 10, and isloaded into the main memory and then executed.

As shown in FIG. 6 by way of example, player object position andorientation data 501, reference virtual camera setting data 502, virtualstereo camera distance data 503, apparatus rotation angle data 504,x-axis threshold data 505, y-axis threshold data 506, z-axis thresholddata 507, and reference distance data 508 are stored in the main memory32. The player object position and orientation data 501, the referencevirtual camera setting data 502, the virtual stereo camera distance data503, and the apparatus rotation angle data 504 are data which aregenerated by the CPU 311 executing the game program. The x-axisthreshold data 505, the y-axis threshold data 506, the z-axis thresholddata 507, and the reference distance data 508 are data which arecontained in the game program.

The player object position and orientation data 501 represents aposition and an orientation of the player object in the virtual gamespace. The position of the player object is represented by coordinateswith respect to xyz-axis directions in a world coordinate systemrepresenting the virtual space and the orientation of the player objectis represented by respective angles relative to the xyz axes.

The reference virtual camera setting data 502 represents a setting ofthe reference virtual camera and contains information of a position andan orientation of the reference virtual camera. The position of thereference virtual camera is represented by coordinates with respect tothe xyz-axis directions in the world coordinate system representing thevirtual space and the orientation of the reference virtual camera isrepresented by respective angles relative to the xyz axes. Further, thereference virtual camera setting data 502 contains information of aviewing angle, a near clip plane, a far clip plane, and the like of thereference virtual camera.

The virtual stereo camera distance data 503 represents a distancebetween the right virtual camera and the left virtual camera. Thereference distance data 508 represents a reference value of the distancebetween the right virtual camera and the left virtual camera.

As will be described later, the value of the virtual stereo cameradistance data 503 is set based on the reference value represented by thereference distance data 508.

The x-axis threshold data 505 and the y-axis threshold data 506 are usedin a later-described virtual stereo camera setting update process andeach represent threshold data to be used when determining how to adjustthe orientation of the reference virtual camera.

The z-axis threshold data 507 is used in the later-described virtualstereo camera setting update process and represents threshold data to beused when determining how to adjust a virtual stereo camera distance.

[Game Process]

In the following, a specific operation of information processing in theexemplary embodiment will be described with reference to FIG. 7 and FIG.8. Firstly, when the game apparatus is powered on, a boot program (notshown) is executed by the CPU 311. Thus, the game program stored in theinternal data storage memory is loaded and stored in the main memory 32.The game program stored in the main memory 32 is executed by the CPU311, thereby performing the process shown in flow charts of FIG. 7 andFIG. 8. FIG. 7 and FIG. 8 are flow charts each showing a series ofprocesses performed in a unit time (e.g., at intervals of 1/60 sec) asan example of the game process which is performed by the CPU 311executing the game program. In FIG. 7 and FIG. 8, step is abbreviated as“S”.

When the game process is started, the CPU 311 firstly performs aninitialization process (step 10). Specifically, the CPU 311 sets variousdata stored in the main memory 32 to default values.

When the initialization process is completed, the CPU 311 performs agame operation input reception process (step 105). Specifically, the CPU311 recognizes an input state of each of the analog stick 15 and theoperation buttons 14A to 14E of the game apparatus.

When the game operation input reception process is completed, the CPU311 performs a player object position and orientation update process(step 110). Specifically, the CPU 311 updates the position and theorientation of the player object in the virtual space based on the inputstate of the analog stick 15 or the like, and updates the player objectposition and orientation data 501.

When the player object position and orientation update process iscompleted, the CPU 311 performs a reference virtual camera settingprocess (step 115). Specifically, the CPU 311 firstly obtains theposition and the orientation of the player object with reference to theplayer object position and orientation data 501. Then, based on theobtained position and the orientation of the player object, the CPU 311sets the position and the orientation of the reference virtual camera.More specifically, the CPU 311 determines, as a position (coordinates ofthe originating point of the reference virtual camera coordinate system)of the reference virtual camera, a position at a predetermined distancebehind and above the player object 310 with respect to a direction inwhich the player object faces. Further, the CPU 311 determines theorientation (directions of the respective axes of the reference virtualcamera coordinate system) of the reference virtual camera such that thedirection facing the position of the player object 310 from thedetermined position of the reference virtual camera becomes the viewingdirection of the reference virtual camera. The CPU 311 updates thereference virtual camera setting data 502 so s to represent the settingof the reference virtual camera having been determined as describedabove. The determined orientation of the reference virtual camera is areference orientation for updating the orientation of the referencevirtual camera in the succeeding processing.

When the reference virtual camera setting process is completed, the CPU311 performs a virtual camera distance setting process and sets avirtual stereo camera distance that serves as a reference (step 120). Inthe exemplary embodiment, a distance predetermined by the game programis used as the virtual stereo camera distance serving as the reference,the virtual stereo camera distance data is updated so as to be thepredetermined distance. In another embodiment, for example, the virtualcamera distance serving as the reference may be changed in accordancewith an operation by the user.

When the virtual camera distance setting process is completed, the CPU311 determines whether an input of the activation operation is in an ONstate (step 125). Specifically, it is determined whether an input of theR button 14K, which is a user's operation assigned as the activationoperation, is in the ON state (whether the R button 14K is beingpressed). When it is determined that the input of the activationoperation is in the ON state (YES in step 125), the CPU 311 proceeds theprocessing to step 125. Otherwise (NO in step 125), the CPU 311 proceedsthe processing to step 145.

When the CPU 311 determines that the input of the activation operationis in the ON state in step 125, the CPU 311 further determines whetherthe input of the activation operation is switched from an OFF state tothe ON state (step 130). In other words, the CPU 311 determines whetherthe input of the activation operation is switched to the ON state at thecurrent timing, or switched to the ON state at the previous timing andhas been in the ON state since. When the CPU 311 determines that theinput of the activation operation is switched to the ON state at thecurrent timing (YES in step 130), the CPU 311 proceeds the processing tostep 135. When the CPU 311 determines that the input of the activationoperation has been in the ON state (NO in step 130), the CPU 311proceeds the processing to step 140.

When having determined that the input of the activation operation isswitched to the ON state at the current timing in step 130, the CPU 311performs an apparatus rotation angle data initialization process (step135). Specifically, the CPU 311 updates the apparatus rotation angledata 504 so that respective rotation angle data relative to the x-axis,the y-axis, and the z-axis of the game apparatus become zero. With thisprocess, in the subsequent virtual stereo camera setting update process,the rotation angle of the game apparatus is obtained based on theorientation of the game apparatus when the input of the activationoperation input is activated.

When the apparatus orientation data initialization process is completedor when it is determined that the input of the activation operation hasbeen in the ON state in step 130, the CPU 311 performs the virtualstereo camera setting update process (step 140). In the following, thevirtual stereo camera setting update process will be described in detailwith reference to the process flow of FIG. 8.

In the virtual stereo camera setting update process, the CPU 311 firstlyperforms an angular velocity data detection process (step 200).Specifically, the CPU 311 obtains respective angular velocities in thex-axis, y-axis, and z-axis directions sampled by the angular velocitysensor 40.

When the angular velocity data detection process is completed, the CPU311 performs an apparatus rotation angle data update process (step 210).Specifically, based on the angular velocity data detected in step 200,the CPU 311 calculates respective angles about the x-axis, y-axis, andz-axis at which the game apparatus is rotated. Then, the CPU 311 addsthe calculated angles to the immediately previous apparatus rotationangles (the rotation angles about the x-axis, y-axis, and z-axis basedon the apparatus reference orientation), respectively, which have beenobtained with reference to the apparatus rotation angle data 504 beforebeing updated. Thereby, current apparatus rotation angles arecalculated. The CPU 311 updates the apparatus rotation angle data 504 soas to represent the calculated apparatus rotation angles.

When the apparatus rotation angle data update process is completed, theCPU 311 updates the orientation of the reference virtual camera based onthe updated apparatus rotation angle data 504 (steps 215 to 245). In thefollowing, a flow of updating the orientation of the reference virtualcamera will be described.

Firstly, with reference to the rotation angle of the game apparatusabout the x-axis obtained from the updated apparatus rotation angle data504, the CPU 311 determines whether the rotation angle about the x-axisis lower than or equal to a threshold obtained with reference to thex-axis threshold data 505 (step 215). When the rotation angle of thegame apparatus about the x-axis is lower than or equal to the threshold(YES in step 215), the CPU 311 rotates the reference virtual camera inthe x-axis direction in accordance with the rotation angle of the gameapparatus (step 220). More Specifically, with reference to the referencevirtual camera setting data 502, the CPU 311 obtains the position andthe orientation of the reference virtual camera set in step S115, androtates the reference virtual camera, from the obtained orientation,about the x-axis in the reference virtual camera coordinate system, byan angle corresponding to the rotation angle of the game apparatus aboutthe x-axis. The CPU 311 updates the reference virtual camera settingdata 502 so as to represent the orientation of the rotated referencevirtual camera. When the rotation angle of the game apparatus about thex-axis is higher than the threshold (NO in step 215), if the virtualcamera is rotated by an angle corresponding to the rotation angle of thegame apparatus about the x-axis, the player object may deviate from theviewing angle of the reference virtual camera. For this reason, thevirtual camera is rotated by an angle corresponding to the rotationangle about the x-axis set as the threshold instead of being rotated bythe angle corresponding to the rotation angle of the game apparatusabout the x-axis. Then, the CPU 311 updates the reference virtual camerasetting data 502 so as to represent the orientation of the rotatedreference virtual camera (step 225). Thus, the reference virtual camerais rotated up to the angle set as the threshold, thereby the playerobject is always displayed on the screen. In the description above andbelow, the threshold and the rotation angle are compared in a case whereboth of the threshold and the rotation angle are positive values.However, in reality, based on a reference position, a rotation angle inone direction is represented by a positive value, and a rotation anglein a direction opposite to the one direction is represented by anegative value. Furthermore, it is checked whether the rotation angle iswithin the threshold also with respect to the rotation angle in thenegative direction. An absolute value of the threshold for the positivedirection may be set to be equal to or different from an absolute valueof the threshold for the negative direction.

When the reference virtual camera setting data 502 relative to thex-axis has been updated, the CPU 311 performs, for the rotation angleabout the y-axis, processes similar to the processes (steps 230 to 240)for the rotation angle about the x-axis. That is, the CPU 311 rotatesthe reference virtual camera about the y-axis of the reference virtualcamera coordinate system by an angle corresponding to the rotation angleof the game apparatus about the y-axis or by the rotation angle aboutthe y-axis set as the threshold. Then, the CPU 311 updates the referencevirtual camera setting data 502. These processes are similar to those inthe case of the x-axis direction, and thus a detailed descriptionthereof is omitted here.

When the reference virtual camera setting data 502 relative to they-axis has been updated, the CPU 311 updates the reference virtualcamera setting data 502 relative to the rotation angle about the z-axis(step 245). Specifically, the CPU 311 rotates the orientation of thereference virtual camera, by an angle corresponding to the rotationangle of the game apparatus about the z-axis, by rotating the referencevirtual camera about the z-axis in the reference virtual cameracoordinate system. Then, the CPU 311 updates the reference virtualcamera setting data 502. Unlike the rotation angle about the x directionor the y direction, the viewing direction (the z-axis direction in thereference virtual camera coordinate system) of the reference virtualcamera faces substantially in the direction of the player object.Consequently, the player object will be always displayed on the screeneven if the reference virtual camera is rotated by any angle about thez-axis in the reference virtual camera coordinate system. Accordingly,the orientation of the reference virtual camera about the z-axis isupdated without determining whether the rotation angle is higher thanthe threshold.

As described above, the orientation of the reference virtual camera ischanged and the reference virtual camera setting data 502 is updatedthrough the processes of steps 215 to 245.

When the reference virtual camera setting data 502 has been updated, theCPU 311 updates the virtual stereo camera distance data 503 (steps 250to 260). In the following, a flow of updating the virtual stereo cameradistance data 503 will be described.

Firstly, with reference to the rotation angle of the game apparatusabout the z-axis obtained from the updated apparatus rotation angle data504, the CPU 311 determines whether the rotation angle about the z-axisis lower than or equal to the threshold obtained with reference to thez-axis threshold data 507 (step 250). When the rotation angle of thegame apparatus about the z-axis is lower than or equal to the threshold(YES in step 250), the CPU 311 adjusts the virtual stereo cameradistance in accordance with the rotation angle of the game apparatusabout the z-axis (step 255). Specifically, the reference value of thevirtual stereo camera distance obtained with reference to the referencedistance data 508 is reduced in accordance with the rotation angle ofthe apparatus orientation about the z-axis. More specifically, thereference value is set so that the rotation angle of the apparatusorientation about the z-axis of 0 degrees corresponds to 100% of thereference value and the rotation angle equal to the z-axis thresholdcorresponds to 0% of the reference value. The CPU 311 updates thevirtual stereo camera distance data 503 so as to represent the value ofthe virtual stereo camera distance. When the rotation angle of the gameapparatus about the z-axis is higher than the z-axis threshold (NO instep 250), the CPU 311 updates the virtual stereo camera distance data503 so that the virtual stereo camera distance becomes zero (step 260).

As described above, the virtual stereo camera distance data 503 isupdated through the processes of steps 250 to 260. When the virtualstereo camera distance data 503 has been updated, the CPU 311 ends thevirtual stereo camera setting update process and returns the processingto step 145 in the previous process flow of FIG. 7.

When the virtual stereo camera setting update process is completed, andwhen it is determined that the input of the activation operation is notswitched to the ON state in step 125, the CPU 311 performs a virtualstereo camera positioning process (step 145).

When the virtual stereo camera positioning process is completed, the CPU311 captures the virtual space by means of the positioned right virtualcamera and the left virtual camera, generates an image for a right eyeand an image for a left eye, and displays the generated images on thedisplay means (step 150).

FIG. 9 shows how the virtual stereo camera is positioned. The CPU 311firstly obtains a setting of a reference virtual camera Bk withreference to the reference virtual camera setting data 502. Further, theCPU 311 obtains a virtual stereo camera distance Kk with reference tothe virtual stereo camera distance data 503. Then, as shown in FIG. 9,the CPU 311 moves the reference virtual camera, from an originatingpoint O in the reference virtual camera coordinate system, in an x-axispositive direction, so as to be spaced from the originating point O by adistance Kk/2 and positioned as a right virtual camera Mk. At the sametime, the CPU 311 moves the reference virtual camera, from theoriginating point O in the reference virtual camera coordinate system,in an x-axis negative direction, so as to be spaced from the originatingpoint O by the distance Kk/2 and positioned as a left virtual camera Hk.The viewing direction of the left virtual camera Hk and the viewingdirection of the right virtual camera Mk are parallel to each other.

When the process of generating and displaying the image for a right eyeand the image for a left eye is completed, the CPU 311 determineswhether an operation for ending the game process has been performed bythe user (step 155). When the CPU 311 determines that an operation forending the game process has been performed (YES in step 155), the CPU311 ends the execution of the game program. When the CPU 311 determinesthat an operation for ending the game process has not been performed bythe user (NO in step 155), the CPU 311 repeats the processing from step105.

The game apparatus 10 according to the exemplary embodiment has beendescribed above. The game apparatus 10 according to the exemplaryembodiment can reduce a parallax of images in accordance with amagnitude of displacement, generated by the user rotating the gameapparatus 10 about the z-axis (in the roll direction), between theviewing direction of the user and the optimal direction for viewing astereoscopic image, thereby improving visibility.

In the exemplary embodiment, a case has been described in which therotation angle about the z-axis (in the roll direction) is compared withthe threshold set to 25 degrees. However, the threshold may be set toany degrees.

Furthermore, in the above-description, the exemplary embodiment isapplied to the hand-held game apparatus 10. However, the exemplaryembodiment is not limited thereto. The exemplary embodiment isapplicable to a stationary game apparatus and a mobile informationterminal such as a mobile phone, a personal handy-phone system (PHS),and a PDA. Moreover, the exemplary embodiment is applicable to astationary game device and a personal computer.

While the exemplary embodiment has been described in detail, theforegoing description is in all aspects illustrative and notrestrictive. It is understood that numerous other modifications andvariations can be devised without departing from the scope of theexemplary embodiment. It is also understood that the one skilled in theart can implement the exemplary embodiment in the equivalent range basedon the description of the present specification, and the commontechnological knowledge. Further, it should be understood that the termsused in the present specification have meanings generally used in theart unless otherwise specified. Therefore, unless otherwise defined, allthe jargons and technical terms used in the present specification havethe same meanings as those generally understood by one skilled in theart. In the event of nay contradiction, the present specification(including the definitions) precedes.

The image generation program, the image generation apparatus, the imagegeneration system, and the image generation method according to theexemplary embodiment are useful as an image generation program, an imagegeneration apparatus, an image generation system, an image generationmethod, and the like which can improve visibility.

1. A computer-readable storage medium having stored therein an image generation program to be executed by a computer of a display device including a display section for displaying a stereoscopically visible image, the image generation program causing the computer to execute: setting a virtual stereo camera in a predetermined virtual space; obtaining a stereoscopically visible image by using the virtual stereo camera; receiving an activation operation performed by a user and activating, based on the activation operation, camera control for controlling an orientation of the virtual stereo camera in accordance with an orientation of the display section; obtaining, based on a reference orientation which is the orientation of the display section when the camera control is activated, a change amount of the orientation of the display section from the reference orientation as a display section orientation change amount; controlling the orientation of the virtual stereo camera based on the display section orientation change amount; and adjusting, based at least on a directional component in a roll direction of the display section orientation change amount, the virtual stereo camera in a manner such that the greater the directional component in the roll direction of the display section orientation change amount is, the smaller a degree of stereoscopic effect of the image obtained by using the virtual stereo camera becomes.
 2. The storage medium according to claim 1, wherein the virtual stereo camera is controlled so that the degree of stereoscopic effect becomes zero when the directional component in the roll direction of the display section orientation change amount exceeds a predetermined threshold for stereoscopic effect degree adjustment.
 3. The storage medium according to claim 1, the image generation program further causes the computer to execute moving an object based on an operation performed by the user, wherein a position of the virtual stereo camera is set based on a position of the moved object.
 4. The storage medium according to claim 3, wherein the object is moved also when the camera control is activated.
 5. The storage medium according to claim 3, wherein a change amount of the orientation of the virtual stereo camera is limited.
 6. A hand-held image generation apparatus including a display section, the image generation apparatus comprising: a virtual stereo camera setting unit which sets a virtual stereo camera in a predetermined virtual space; an image obtaining unit which obtains a stereoscopically visible image by using the virtual stereo camera; an activation unit which receives an activation operation performed by a user and activates, based on the activation operation, camera control for controlling an orientation of the virtual stereo camera in accordance with an orientation of the display section; a display section orientation change amount obtaining unit which obtains, based on a reference orientation which is the orientation of the display section when the camera control is activated, a change amount of the orientation of the display section from the reference orientation as a display section orientation change amount; a virtual stereo camera orientation control unit which controls the orientation of the virtual stereo camera based on the display section orientation change amount; and a stereoscopic effect degree adjusting unit which adjusts, based at least on a directional component in a roll direction of the display section orientation change amount, the virtual stereo camera in a manner such that the greater the directional component in the roll direction of the display section orientation change amount is, the smaller a degree of stereoscopic effect of the image obtained by using the virtual stereo camera becomes.
 7. An image generation method to be executed by a computer of a display device including a display section for displaying a stereoscopically visible image, the image generation method comprising: setting a virtual stereo camera in a predetermined virtual space; obtaining a stereoscopically visible image by using the virtual stereo camera; receiving an activation operation performed by a user and activating, based on the activation operation, camera control for controlling an orientation of the virtual stereo camera in accordance with an orientation of the display section; obtaining, based on a reference orientation which is the orientation of the display section when the camera control is activated, a change amount of the orientation of the display section from the reference orientation as a display section orientation change amount; controlling the orientation of the virtual stereo camera based on the display section orientation change amount; and adjusting, based at least on a directional component in a roll direction of the display section orientation change amount, the virtual stereo camera in a manner such that the greater the directional component in the roll direction of the display section orientation change amount is, the smaller a degree of stereoscopic effect of the image obtained by using the virtual stereo camera becomes.
 8. A hand-held image generation system including a display section, the image generation system comprising: a virtual stereo camera setting unit which sets a virtual stereo camera in a predetermined virtual space; an image obtaining unit which obtains a stereoscopically visible image by using the virtual stereo camera; an activation unit which receives an activation operation performed by a user and activates, based on the activation operation, camera control for controlling an orientation of the virtual stereo camera in accordance with an orientation of the display section; a display section orientation change amount obtaining unit which obtains, based on a reference orientation which is the orientation of the display section when the camera control is activated, a change amount of the orientation of the display section from the reference orientation as a display section orientation change amount; a virtual stereo camera orientation control unit which controls the orientation of the virtual stereo camera based on the display section orientation change amount; and a stereoscopic effect degree adjusting unit which adjusts, based at least on a directional component in a roll direction of the display section orientation change amount, the virtual stereo camera in a manner such that the greater the directional component in the roll direction of the display section orientation change amount is, the smaller a degree of stereoscopic effect of the image obtained by using the virtual stereo camera becomes. 